-
Notifications
You must be signed in to change notification settings - Fork 1.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bug in test case for real square root function #115
base: dev
Are you sure you want to change the base?
Conversation
Hi @davidsimowitz , Thanks for finding this bug, and it is fixed and will be merged in the next release. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This has been fixed.
Hi @davidsimowitz , Please, apply the change against the After that, I'll merge it |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for updating the PR to the dev branch.
Hi Tsung,
Sorry for hijacking this thread.
I have problem understanding the problem statement for a variant :
"The US President is elected by the members of the Electoral College. The
number of electors per state and Washington, D.C., are given in Table 17.1.
All electors from each state as well as Washington, D.C., cast their vote
for the same candidate. Write a program to determine if a tie is possible
in a presidential election with two candidates."
If all electors from each state as well as Washington, D.C. cast their vote
for same candidate, how can there be ever a tie? There will only be one
winner of election right?
…On Sun, Nov 17, 2019 at 6:04 PM Tsung-Hsien Lee ***@***.***> wrote:
Hi @davidsimowitz <https://github.com/davidsimowitz> ,
Thanks for finding this bug, and it is fixed and will be merged in the
next release.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#115?email_source=notifications&email_token=ABUYZMYKHWBNHLZSQG6TZQDQUHZZ5A5CNFSM4JNTL6DKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEEI6BNA#issuecomment-554819764>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABUYZMZZXEGUJENAYVW23ADQUHZZ5ANCNFSM4JNTL6DA>
.
|
@zorro786 Please, open a separate issue for this question. Do not reuse other issues, because it becomes hard to track conversations. |
@davidsimowitz Hi there, sorry for the long wait. I'll check this out right after I do my state exams at the end of June. I'll keep you updated :) |
For the Compute the real square root problem, the test data has an incorrect entry in one of the rows. The second floating point value in the row of the tsv file is the expected square root of the first floating point value. Since the first value is
0.0
the square root for this test case cannot be1.571727783679971e-162
.My guess is the expected square root values in the second column of test data were used to calculate the first column inputs. This caused the product to underflow to
0.0
in this one case.